#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H

#include <QtGui>
#include "defines.h"
#include <stdlib.h>


class settingsDialog : public QDialog
{
    Q_OBJECT

    QLineEdit   *txtIEPath,
                *txtFireFoxPath,
                *txtChromePath,
                *txtOperaPath;

    QLabel      *lblIEPath,
                *lblFireFoxPath,
                *lblChromePath,
                *lblOperaPath;

    QRadioButton *radIEPath,
                 *radFireFoxPath,
                 *radChromePath,
                 *radOperaPath;

    QPushButton *buttOK,
                *buttCancel;

    QString IEPath, FireFoxPath, ChromePath, OperaPath;

    QString* Browsers[4];
    BROWSER defBrowser;
    settingsDialog();
    void initPaths();

public:
    static settingsDialog* getInstance()
    {
        static settingsDialog* set = 0;
        if(set) return set;
        else return (set = new settingsDialog());
    }

    QString& getChromePath()
    {
        return ChromePath;
    }

    QString& getFireFoxPath()
    {
        return FireFoxPath;
    }

    QString& getIEPath()
    {
        return IEPath;
    }
    QString& getOperaPath()
    {
        return OperaPath;
    }

    QString& getDefaultBrowserPath()
    {
        return *(Browsers[defBrowser]);
    }


public slots:
    void savePaths();
    void setDef(bool);
};

#endif // SETTINGSDIALOG_H
